﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="author" content="ISUX">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>新闻列表</title>
    <link rel="stylesheet" href="/ViewMob/css/wxui.css">
    <link rel="stylesheet" href="/ViewMob/css/default.css">

    <link href="//at.alicdn.com/t/font_381216_amtfd8zumzd26gvi.css" rel="stylesheet" />
    <link href="/ViewMob/js/layer/need/layer.css" rel="stylesheet" />
    <script src="/ViewMob/js/layer/layer.m.js"></script>
    <style>
        .ms-controller, [ms-controller] {
            display: none;
        }

        .page {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            opacity: 0;
            z-index: 1;
        }

            .page.js_show {
                opacity: 1;
            }

        .page__hd {
            padding: 24px;
            text-align: center;
            background: #4faeff url(../images/bg-account.jpg) 100% 100%;
            color: white;
        }

        .page__bd_spacing {
            padding: 0 15px;
        }

        .page__ft {
            padding-top: 40px;
            padding-bottom: 10px;
            text-align: center;
        }

            .page__ft img {
                height: 19px;
            }

            .page__ft.j_bottom {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
            }

        .page__title {
            text-align: left;
            font-size: 20px;
            font-weight: 400;
        }

        .page__desc {
            margin-top: 5px;
            text-align: left;
            font-size: 14px;
        }

        .page.home .page__intro-icon {
            margin-top: -.2em;
            margin-left: 5px;
            width: 16px;
            height: 16px;
            vertical-align: middle;
        }

        .page.home .page__title {
            font-size: 0;
            margin-bottom: 15px;
        }


        .head-oneself {
            width: 4.5rem;
            height: 4.5rem;
            margin-left: 20px;
        }

            .head-oneself img {
                border: 2px solid rgba(0,0,0,.2);
            }

        .ybl {
            background-color: #10c55b;
            font-size: 30px;
            color: white;
        }

        .kx {
            background-color: #10c55b;
        }

        .wbl {
            background-color: lightgray;
            font-size: 20px;
            color: white;
        }

        .YZ {
            POSITION: absolute;
            RIGHT: 10PX;
            TOP: 10PX;
            FONT-SIZE: 70PX;
            COLOR: #ff0000;
            line-height: 70px;
        }
    </style>
</head>
<body style="background-color: #f8f8f8;" ms-controller="XWLB">
    <div class="page__hd">
        <h1 class="page__title">新闻列表--{{typename}}</h1>
        <p class="page__desc">显示最新的新闻列表</p>
    </div>
    <div class="weui-panel weui-panel_access" style="margin-top: 0PX">
        <div class="weui-panel__hd">共计找到{{ssdata.size()}}条结果<a href="#" class="color2" style="float: right" ms-click="query()">选择年份{{xq}}▼</a></div>
        <div class="weui-panel__bd">

            <a class="weui-media-box weui-media-box_appmsg" ms-repeat-item="ssdata" ms-attr-href="UI_XWNR.html?ID={{item.ID}}">
                <div class="weui-media-box__hd" style="background-color: #10c55b; border-radius: 50%; width: 50px; height: 50px; line-height: 50px; color: antiquewhite; font-size: 16px;">
                    {{$index+1}}
                </div>
                <div class="weui-media-box__bd">
                    <h4 class="weui-media-box__title" style="font-size: 15px">{{item.Title}}</h4>
                    <p class="weui-media-box__desc">{{item.CRDate}}【{{item.Source}}】</p>
                </div>
            </a>

        </div>

    </div>



    <script src="/ViewMob/js/zepto.min.js"></script>
    <script src="/ViewMob/js/weui.min.js"></script>
    <script src="/ViewMob/js/avalon1.47.js"></script>
    <script src="/ViewMob/js/ComFunJS.js"></script>

    <script type="text/javascript" class="searchbar js_show">
        var model = avalon.define({
            $id: "XWLB",
            xq: "",
            ssdata: [],
            xqdata: [],
            type: "",
            typename: "",
            query: function () {
                weui.picker(
                     model.xqdata.$model,
                {
                    className: 'custom-classname',
                    defaultValue: [model.xqdata[0].label],
                    onChange: function (result) {
                    },
                    onConfirm: function (result) {
                        model.godata(result[0]);
                    },
                    id: 'DS'
                });
            },
            godata: function (xq) {
                model.ssdata.clear();
                model.xq = xq;
                $.getJSON("/API/VIEWAPI.ashx?ACTION=COM_GETXWLB", { nf: xq, type: model.type }, function (result) {
                    model.ssdata = result.Result;
                })
            }
        })
        avalon.ready(function () {
            model.type = ComFunJS.getQueryString("type");
            model.typename = ComFunJS.getQueryString("typename");

            $.getJSON("/API/VIEWAPI.ashx?ACTION=COM_GETNF", {}, function (result) {
                for (var i = 0; i < result.Result.length; i++) {
                    model.xqdata.push({
                        label: result.Result[i].NF,
                        value: result.Result[i].NF
                    })
                }
                model.godata(result.Result[0].NF);
            })
        })
    </script>
</body>
</html>
